<?php
echo("HELLO DEAR group09 MEMBERS!!! Juris <br/>");


$mysql_host = "localhost";
$mysql_database = "group09_zxq_db";
$mysql_user = "326270_group09";
$mysql_password = "APMproject1";

$link = mysql_connect($mysql_host, $mysql_user, $mysql_password);
if (!$link) {
  die('Could not connect to database: ' . mysql_error());
}
echo ("Connected successfully to our database :) <br/>");


$db = mysql_select_db($mysql_database, $link);
if (!$db) {
  mysql_error();
} else{
  echo("Successfully selected database! <br/>"); 
}


$result = mysql_query('SELECT * from test_table');
if (!$result) {
    die('Invalid query: ' . mysql_error());
}

/*TODO: continue here with the following tasks:
1) select data from the test table;
2) add data in the test table

//use http://se2.php.net/manual/en/index.php 
//or any other tutorial to build PHP + MySQL web page;

*/

phpinfo();




mysql_close($link);
?>